package com.hziee.mail.model;

import javax.persistence.*;
import java.util.Objects;

@Entity
@Table(name = "order_info", schema = "mall", catalog = "")
public class OrderInfoEntity {
    private int orderId;
    private String orderNumber;
    private String orderTime;
    private String goodsId;
    private Integer userId;
    private Double price;
    private Integer value;
    private Double allmoney;
    private String payStyle;
    private Integer orderStatus;
    private String linkman;
    private String telephone;
    private String address;
    private String pyaDate;
    private String sendDate;
    private String endDate;
    private String ly;

    @Id
    @Column(name = "order_id")
    public int getOrderId() {
        return orderId;
    }

    public void setOrderId(int orderId) {
        this.orderId = orderId;
    }

    @Basic
    @Column(name = "order_number")
    public String getOrderNumber() {
        return orderNumber;
    }

    public void setOrderNumber(String orderNumber) {
        this.orderNumber = orderNumber;
    }

    @Basic
    @Column(name = "order_time")
    public String getOrderTime() {
        return orderTime;
    }

    public void setOrderTime(String orderTime) {
        this.orderTime = orderTime;
    }

    @Basic
    @Column(name = "goods_id")
    public String getGoodsId() {
        return goodsId;
    }

    public void setGoodsId(String goodsId) {
        this.goodsId = goodsId;
    }

    @Basic
    @Column(name = "user_id")
    public Integer getUserId() {
        return userId;
    }

    public void setUserId(Integer userId) {
        this.userId = userId;
    }

    @Basic
    @Column(name = "price")
    public Double getPrice() {
        return price;
    }

    public void setPrice(Double price) {
        this.price = price;
    }

    @Basic
    @Column(name = "value")
    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    @Basic
    @Column(name = "allmoney")
    public Double getAllmoney() {
        return allmoney;
    }

    public void setAllmoney(Double allmoney) {
        this.allmoney = allmoney;
    }

    @Basic
    @Column(name = "payStyle")
    public String getPayStyle() {
        return payStyle;
    }

    public void setPayStyle(String payStyle) {
        this.payStyle = payStyle;
    }

    @Basic
    @Column(name = "order_status")
    public Integer getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(Integer orderStatus) {
        this.orderStatus = orderStatus;
    }

    @Basic
    @Column(name = "linkman")
    public String getLinkman() {
        return linkman;
    }

    public void setLinkman(String linkman) {
        this.linkman = linkman;
    }

    @Basic
    @Column(name = "telephone")
    public String getTelephone() {
        return telephone;
    }

    public void setTelephone(String telephone) {
        this.telephone = telephone;
    }

    @Basic
    @Column(name = "address")
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    @Basic
    @Column(name = "pya_date")
    public String getPyaDate() {
        return pyaDate;
    }

    public void setPyaDate(String pyaDate) {
        this.pyaDate = pyaDate;
    }

    @Basic
    @Column(name = "send_date")
    public String getSendDate() {
        return sendDate;
    }

    public void setSendDate(String sendDate) {
        this.sendDate = sendDate;
    }

    @Basic
    @Column(name = "end_date")
    public String getEndDate() {
        return endDate;
    }

    public void setEndDate(String endDate) {
        this.endDate = endDate;
    }

    @Basic
    @Column(name = "ly")
    public String getLy() {
        return ly;
    }

    public void setLy(String ly) {
        this.ly = ly;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        OrderInfoEntity that = (OrderInfoEntity) o;
        return orderId == that.orderId &&
                Objects.equals(orderNumber, that.orderNumber) &&
                Objects.equals(orderTime, that.orderTime) &&
                Objects.equals(goodsId, that.goodsId) &&
                Objects.equals(userId, that.userId) &&
                Objects.equals(price, that.price) &&
                Objects.equals(value, that.value) &&
                Objects.equals(allmoney, that.allmoney) &&
                Objects.equals(payStyle, that.payStyle) &&
                Objects.equals(orderStatus, that.orderStatus) &&
                Objects.equals(linkman, that.linkman) &&
                Objects.equals(telephone, that.telephone) &&
                Objects.equals(address, that.address) &&
                Objects.equals(pyaDate, that.pyaDate) &&
                Objects.equals(sendDate, that.sendDate) &&
                Objects.equals(endDate, that.endDate) &&
                Objects.equals(ly, that.ly);
    }

    @Override
    public int hashCode() {
        return Objects.hash(orderId, orderNumber, orderTime, goodsId, userId, price, value, allmoney, payStyle, orderStatus, linkman, telephone, address, pyaDate, sendDate, endDate, ly);
    }
}
